package mr.go.set;

import java.util.Iterator;

/**
 * The interface extends traditional {@link Iterator} with ability to return
 * pair of elements during iteration - an element and its associated value
 * 
 * @author Marcin Rzeźnicki
 * 
 * @param <E>
 *            type of element returned by {@link #next()}
 * @param <P>
 *            type of element's value
 */
public interface ValueIterator<E, P> extends Iterator<E> {

	/**
	 * Value of current element. All calls to this method between two
	 * consecutive calls to {@link #next()} have to return the same value - the
	 * one of element returned by the former {@link #next()}
	 * 
	 * @return value of {@link ValueIterator#next()}
	 */
	P value();
}
